﻿using System;

namespace UnityEngine.PostProcessing
{
	// Token: 0x020000D9 RID: 217
	[Serializable]
	public class AntialiasingModel : PostProcessingModel
	{
		// Token: 0x17000080 RID: 128
		// (get) Token: 0x060005EE RID: 1518 RVA: 0x00024844 File Offset: 0x00022A44
		// (set) Token: 0x060005EF RID: 1519 RVA: 0x0002484C File Offset: 0x00022A4C
		public AntialiasingModel.Settings settings
		{
			get
			{
				return this.m_Settings;
			}
			set
			{
				this.m_Settings = value;
			}
		}

		// Token: 0x060005F0 RID: 1520 RVA: 0x00024858 File Offset: 0x00022A58
		public override void Reset()
		{
			this.m_Settings = AntialiasingModel.Settings.defaultSettings;
		}

		// Token: 0x04000553 RID: 1363
		[SerializeField]
		private AntialiasingModel.Settings m_Settings = AntialiasingModel.Settings.defaultSettings;

		// Token: 0x020000DA RID: 218
		public enum Method
		{
			// Token: 0x04000555 RID: 1365
			Fxaa,
			// Token: 0x04000556 RID: 1366
			Taa
		}

		// Token: 0x020000DB RID: 219
		public enum FxaaPreset
		{
			// Token: 0x04000558 RID: 1368
			ExtremePerformance,
			// Token: 0x04000559 RID: 1369
			Performance,
			// Token: 0x0400055A RID: 1370
			Default,
			// Token: 0x0400055B RID: 1371
			Quality,
			// Token: 0x0400055C RID: 1372
			ExtremeQuality
		}

		// Token: 0x020000DC RID: 220
		[Serializable]
		public struct FxaaQualitySettings
		{
			// Token: 0x0400055D RID: 1373
			[Range(0f, 1f)]
			[Tooltip("The amount of desired sub-pixel aliasing removal. Effects the sharpeness of the output.")]
			public float subpixelAliasingRemovalAmount;

			// Token: 0x0400055E RID: 1374
			[Range(0.063f, 0.333f)]
			[Tooltip("The minimum amount of local contrast required to qualify a region as containing an edge.")]
			public float edgeDetectionThreshold;

			// Token: 0x0400055F RID: 1375
			[Tooltip("Local contrast adaptation value to disallow the algorithm from executing on the darker regions.")]
			[Range(0f, 0.0833f)]
			public float minimumRequiredLuminance;

			// Token: 0x04000560 RID: 1376
			public static AntialiasingModel.FxaaQualitySettings[] presets = new AntialiasingModel.FxaaQualitySettings[]
			{
				new AntialiasingModel.FxaaQualitySettings
				{
					subpixelAliasingRemovalAmount = 0f,
					edgeDetectionThreshold = 0.333f,
					minimumRequiredLuminance = 0.0833f
				},
				new AntialiasingModel.FxaaQualitySettings
				{
					subpixelAliasingRemovalAmount = 0.25f,
					edgeDetectionThreshold = 0.25f,
					minimumRequiredLuminance = 0.0833f
				},
				new AntialiasingModel.FxaaQualitySettings
				{
					subpixelAliasingRemovalAmount = 0.75f,
					edgeDetectionThreshold = 0.166f,
					minimumRequiredLuminance = 0.0833f
				},
				new AntialiasingModel.FxaaQualitySettings
				{
					subpixelAliasingRemovalAmount = 1f,
					edgeDetectionThreshold = 0.125f,
					minimumRequiredLuminance = 0.0625f
				},
				new AntialiasingModel.FxaaQualitySettings
				{
					subpixelAliasingRemovalAmount = 1f,
					edgeDetectionThreshold = 0.063f,
					minimumRequiredLuminance = 0.0312f
				}
			};
		}

		// Token: 0x020000DD RID: 221
		[Serializable]
		public struct FxaaConsoleSettings
		{
			// Token: 0x04000561 RID: 1377
			[Tooltip("The amount of spread applied to the sampling coordinates while sampling for subpixel information.")]
			[Range(0.33f, 0.5f)]
			public float subpixelSpreadAmount;

			// Token: 0x04000562 RID: 1378
			[Tooltip("This value dictates how sharp the edges in the image are kept; a higher value implies sharper edges.")]
			[Range(2f, 8f)]
			public float edgeSharpnessAmount;

			// Token: 0x04000563 RID: 1379
			[Range(0.125f, 0.25f)]
			[Tooltip("The minimum amount of local contrast required to qualify a region as containing an edge.")]
			public float edgeDetectionThreshold;

			// Token: 0x04000564 RID: 1380
			[Range(0.04f, 0.06f)]
			[Tooltip("Local contrast adaptation value to disallow the algorithm from executing on the darker regions.")]
			public float minimumRequiredLuminance;

			// Token: 0x04000565 RID: 1381
			public static AntialiasingModel.FxaaConsoleSettings[] presets = new AntialiasingModel.FxaaConsoleSettings[]
			{
				new AntialiasingModel.FxaaConsoleSettings
				{
					subpixelSpreadAmount = 0.33f,
					edgeSharpnessAmount = 8f,
					edgeDetectionThreshold = 0.25f,
					minimumRequiredLuminance = 0.06f
				},
				new AntialiasingModel.FxaaConsoleSettings
				{
					subpixelSpreadAmount = 0.33f,
					edgeSharpnessAmount = 8f,
					edgeDetectionThreshold = 0.125f,
					minimumRequiredLuminance = 0.06f
				},
				new AntialiasingModel.FxaaConsoleSettings
				{
					subpixelSpreadAmount = 0.5f,
					edgeSharpnessAmount = 8f,
					edgeDetectionThreshold = 0.125f,
					minimumRequiredLuminance = 0.05f
				},
				new AntialiasingModel.FxaaConsoleSettings
				{
					subpixelSpreadAmount = 0.5f,
					edgeSharpnessAmount = 4f,
					edgeDetectionThreshold = 0.125f,
					minimumRequiredLuminance = 0.04f
				},
				new AntialiasingModel.FxaaConsoleSettings
				{
					subpixelSpreadAmount = 0.5f,
					edgeSharpnessAmount = 2f,
					edgeDetectionThreshold = 0.125f,
					minimumRequiredLuminance = 0.04f
				}
			};
		}

		// Token: 0x020000DE RID: 222
		[Serializable]
		public struct FxaaSettings
		{
			// Token: 0x17000081 RID: 129
			// (get) Token: 0x060005F3 RID: 1523 RVA: 0x00024B14 File Offset: 0x00022D14
			public static AntialiasingModel.FxaaSettings defaultSettings
			{
				get
				{
					return new AntialiasingModel.FxaaSettings
					{
						preset = AntialiasingModel.FxaaPreset.Default
					};
				}
			}

			// Token: 0x04000566 RID: 1382
			public AntialiasingModel.FxaaPreset preset;
		}

		// Token: 0x020000DF RID: 223
		[Serializable]
		public struct TaaSettings
		{
			// Token: 0x17000082 RID: 130
			// (get) Token: 0x060005F4 RID: 1524 RVA: 0x00024B34 File Offset: 0x00022D34
			public static AntialiasingModel.TaaSettings defaultSettings
			{
				get
				{
					return new AntialiasingModel.TaaSettings
					{
						jitterSpread = 0.75f,
						sharpen = 0.3f,
						stationaryBlending = 0.95f,
						motionBlending = 0.85f
					};
				}
			}

			// Token: 0x04000567 RID: 1383
			[Tooltip("The diameter (in texels) inside which jitter samples are spread. Smaller values result in crisper but more aliased output, while larger values result in more stable but blurrier output.")]
			[Range(0.1f, 1f)]
			public float jitterSpread;

			// Token: 0x04000568 RID: 1384
			[Range(0f, 3f)]
			[Tooltip("Controls the amount of sharpening applied to the color buffer.")]
			public float sharpen;

			// Token: 0x04000569 RID: 1385
			[Range(0f, 0.99f)]
			[Tooltip("The blend coefficient for a stationary fragment. Controls the percentage of history sample blended into the final color.")]
			public float stationaryBlending;

			// Token: 0x0400056A RID: 1386
			[Range(0f, 0.99f)]
			[Tooltip("The blend coefficient for a fragment with significant motion. Controls the percentage of history sample blended into the final color.")]
			public float motionBlending;
		}

		// Token: 0x020000E0 RID: 224
		[Serializable]
		public struct Settings
		{
			// Token: 0x17000083 RID: 131
			// (get) Token: 0x060005F5 RID: 1525 RVA: 0x00024B7C File Offset: 0x00022D7C
			public static AntialiasingModel.Settings defaultSettings
			{
				get
				{
					return new AntialiasingModel.Settings
					{
						method = AntialiasingModel.Method.Fxaa,
						fxaaSettings = AntialiasingModel.FxaaSettings.defaultSettings,
						taaSettings = AntialiasingModel.TaaSettings.defaultSettings
					};
				}
			}

			// Token: 0x0400056B RID: 1387
			public AntialiasingModel.Method method;

			// Token: 0x0400056C RID: 1388
			public AntialiasingModel.FxaaSettings fxaaSettings;

			// Token: 0x0400056D RID: 1389
			public AntialiasingModel.TaaSettings taaSettings;
		}
	}
}
